package com.Mapper;

import com.Bean.User;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Date;
import java.util.List;

public class UserTest {

          @Test
         public  void testB(){
          ApplicationContext context = new ClassPathXmlApplicationContext("bean6.xml");
          UserMapper mapper = (UserMapper) context.getBean("userDao");
              List<User> users = mapper.selectUser();
              for (User user : users) {
                  System.out.println(user);
              }
          }
       @Test
    public  void testC(){
        ApplicationContext context = new ClassPathXmlApplicationContext("bean6.xml");
        UserMapper mapper = (UserMapper) context.getBean("userDaoImpl");
        List<User> users = mapper.selectUser();
        for (User user : users) {
            System.out.println(user);
        }
    }
}
